1. Technical Field of the Invention
The present invention generally relates to computer systems. More particularly, and not by way of any limitation, the present invention is directed to a system and method of verifying the accuracy of a memory image that is written from system memory to a dump disk when a fatal error causes a computer system to crash.
2. Description of Related Art
For various reasons, computer systems may experience fatal errors causing them to crash. A series of tests and trouble-shooting procedures are accordingly required to determine the cause of the crash. It is often desirable for testing and trouble-shooting purposes to analyze the data that was in the computer's physical memory (i.e. Random Access Memory, RAM) at the time that the computer system crashed. Since the RAM is volatile memory, it is erased when power is removed from the computer for reinitialization purposes. Therefore, a piece of software known as crash dump path code is written to dump the contents of the physical memory out to a storage device (dump disk) when the system crashes. For this data to be useful, the data written to the dump disk must accurately reflect the data, as well as the location of the data, that was in physical memory at the time of the crash.
In order to compare the data in physical memory with the data that is dumped to disk, it is desirable to have an image of the data in RAM before the data is dumped, and an image of the data that is dumped to disk. In existing systems, however, only the “after” image is available, and developers have to assume that the dumped data accurately reflects what was in RAM before the crash. However, the accuracy of the dumped data depends on whether or not the crash dump path code has been written correctly. If not, the dumped data may not be accurate, and this may mislead developers as to the underlying cause of the system crash. Thus, it is highly desirable during development to have a method of verifying the accuracy of the dumped data, and thereby verifying the operation of the crash dump path code.
Developers have attempted to establish a “before” image by seeding the RAM with a pattern of data (i.e., signature) that can be extracted from the dumped data for comparison and verification. However, this procedure has not been successful due, in part, to the dynamic nature of the system RAM. In many operating systems, if a portion of memory is not being actively utilized, it is swapped out of the RAM and stashed on a part of the system disk called a swap partition until it is needed. When the swapped portion is needed, it is swapped back in. This swapping procedure is particularly active when running resource-intensive programs. If a portion of the RAM is swapped out when a system crash occurs, that portion of the RAM is not included in the crash dump. Therefore, an incomplete signature may be dumped. Developers have attempted to solve this problem by requiring the signature to cycle through the RAM to prevent swapping. However, this procedure has proven to be unreliable, especially when running resource-intensive programs. It should be appreciated that a solution to the aforementioned deficiencies would be highly desirable.